#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    int findKthLargest(vector<int>& nums, int k) {
        priority_queue<int> heap;
        for (auto e : nums)
        {
            heap.push(e);
        }
        int ret;
        while (k--)
        {
            ret = heap.top();
            heap.pop();
        }

        return ret;
    }
};